<?php
/**
 * Created by PhpStorm.
 * User: R.Ice
 * Date: 2019/1/26
 * Time: 14:04
 * name:新增课时附件
 * url:/erpCourse/add_course_time_attachment
 */


$cta_ctid = $route->bodyParams['cta_ctid'];    //课时id
$cta_url  = $route->bodyParams['cta_url'];     //附件路径
$cta_type = $route->bodyParams['cta_type'];    //附件类型（扩展名）
$cta_name = $route->bodyParams['cta_name'];    //附件名称
$cta_category = $route->bodyParams['cta_category']; 
$cta_osid = $route->bodyParams['cta_osid']; 

//写入数组
$insertArr = [
    'cta_ctid'        =>$cta_ctid,
    'cta_url'         =>$cta_url,
    'cta_type'        =>$cta_type,
    'cta_name'        =>$cta_name,
    'cta_create_time' =>time(),
    'cta_category' => $cta_category,
    'cta_osid' => $cta_osid
];
//执行写入语句
$rsData = $db->mysqlDB->insert("oa_course_time_attachment",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );